<template>
  <div class="g-content">
    <div class="g-item"></div>
  </div>
</template>

<script>
export default {
  beforeCreate: function () {
    this.$nextTick(() => {
      document.getElementsByClassName("main")[0].classList.add("g-container");
    });
  },
  beforeDestroy: function () {
    document.getElementsByClassName("main")[0].classList.remove("g-container");
  },
};
</script>

<style lang="scss" scoped>
.g-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  filter: contrast(20);
  background: #000;
  &::before {
    position: absolute;
    content: "";
    background: #000;
    top: 0;
    left: 0;
    right: 0;
    height: 20vh;
    z-index: 10;
  }
}
.g-item {
  width: 30vmin;
  height: 30vmin;
  margin: 30vh auto;
  // border: 1vmin solid #fff;
  border-radius: 46% 42% 47% 44%;
  background: linear-gradient(#fff, #9c27b0);
  transform: scale(15) translate(0, -13vh) rotate(0deg);
  animation: rotate 10s infinite linear alternate;

  &::before {
    content: "";
    position: absolute;
    width: 99%;
    height: 99%;
    background: #000;
    border-radius: 46% 42% 47% 44%;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
  }
}
@keyframes rotate {
  100% {
    transform: scale(10) translate(0, -15vh) rotate(360deg);
  }
}
</style>